Optimal. Leaf size=105 \[ \frac {a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {2 a^3 A \cot ^3(c+d x)}{3 d}-\frac {a^3 A \cot ^5(c+d x)}{5 d}+\frac {a^3 A \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 6, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3029, 2788,
3852, 8, 3853, 3855} \begin {gather*} -\frac {a^3 A \cot ^5(c+d x)}{5 d}-\frac {2 a^3 A \cot ^3(c+d x)}{3 d}+\frac {a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^3 A \cot (c+d x) \csc (c+d x)}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2788
Rule 3029
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \csc ^6(c+d x) (a+a \sin (c+d x))^3 (A-A \sin (c+d x)) \, dx &=\left (a^3 A^3\right ) \int \frac {\cot ^6(c+d x)}{(A-A \sin (c+d x))^2} \, dx\\ &=\frac {a^3 \int \left (-A^4 \csc ^2(c+d x)-2 A^4 \csc ^3(c+d x)+2 A^4 \csc ^5(c+d x)+A^4 \csc ^6(c+d x)\right ) \, dx}{A^3}\\ &=-\left (\left (a^3 A\right ) \int \csc ^2(c+d x) \, dx\right )+\left (a^3 A\right ) \int \csc ^6(c+d x) \, dx-\left (2 a^3 A\right ) \int \csc ^3(c+d x) \, dx+\left (2 a^3 A\right ) \int \csc ^5(c+d x) \, dx\\ &=\frac {a^3 A \cot (c+d x) \csc (c+d x)}{d}-\frac {a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}-\left (a^3 A\right ) \int \csc (c+d x) \, dx+\frac {1}{2} \left (3 a^3 A\right ) \int \csc ^3(c+d x) \, dx+\frac {\left (a^3 A\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}-\frac {\left (a^3 A\right ) \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {a^3 A \tanh ^{-1}(\cos (c+d x))}{d}-\frac {2 a^3 A \cot ^3(c+d x)}{3 d}-\frac {a^3 A \cot ^5(c+d x)}{5 d}+\frac {a^3 A \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {1}{4} \left (3 a^3 A\right ) \int \csc (c+d x) \, dx\\ &=\frac {a^3 A \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {2 a^3 A \cot ^3(c+d x)}{3 d}-\frac {a^3 A \cot ^5(c+d x)}{5 d}+\frac {a^3 A \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^3 A \cot (c+d x) \csc ^3(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(268\) vs. \(2(105)=210\).
time = 0.05, size = 268, normalized size = 2.55 \begin {gather*} a^3 A \left (\frac {7 \cot \left (\frac {1}{2} (c+d x)\right )}{30 d}+\frac {\csc ^2\left (\frac {1}{2} (c+d x)\right )}{16 d}-\frac {19 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{480 d}-\frac {\csc ^4\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^4\left (\frac {1}{2} (c+d x)\right )}{160 d}+\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right )}{16 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right )}{32 d}-\frac {7 \tan \left (\frac {1}{2} (c+d x)\right )}{30 d}+\frac {19 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{480 d}+\frac {\sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{160 d}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 140, normalized size = 1.33
method | result | size |
derivativedivides | \(\frac {2 a^{3} A \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{3} A \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )-2 a^{3} A \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+a^{3} A \cot \left (d x +c \right )}{d}\) | \(140\) |
default | \(\frac {2 a^{3} A \left (\left (-\frac {\left (\csc ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \csc \left (d x +c \right )}{8}\right ) \cot \left (d x +c \right )+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+a^{3} A \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )-2 a^{3} A \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+a^{3} A \cot \left (d x +c \right )}{d}\) | \(140\) |
risch | \(-\frac {a^{3} A \left (-60 i {\mathrm e}^{8 i \left (d x +c \right )}+15 \,{\mathrm e}^{9 i \left (d x +c \right )}+240 i {\mathrm e}^{6 i \left (d x +c \right )}+90 \,{\mathrm e}^{7 i \left (d x +c \right )}-40 i {\mathrm e}^{4 i \left (d x +c \right )}+80 i {\mathrm e}^{2 i \left (d x +c \right )}-90 \,{\mathrm e}^{3 i \left (d x +c \right )}-28 i-15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{30 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}-\frac {a^{3} A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}+\frac {a^{3} A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}\) | \(161\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 175, normalized size = 1.67 \begin {gather*} \frac {15 \, A a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 60 \, A a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {120 \, A a^{3}}{\tan \left (d x + c\right )} - \frac {8 \, {\left (15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} + 3\right )} A a^{3}}{\tan \left (d x + c\right )^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 201 vs.
\(2 (95) = 190\).
time = 0.37, size = 201, normalized size = 1.91 \begin {gather*} \frac {56 \, A a^{3} \cos \left (d x + c\right )^{5} - 80 \, A a^{3} \cos \left (d x + c\right )^{3} + 15 \, {\left (A a^{3} \cos \left (d x + c\right )^{4} - 2 \, A a^{3} \cos \left (d x + c\right )^{2} + A a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 15 \, {\left (A a^{3} \cos \left (d x + c\right )^{4} - 2 \, A a^{3} \cos \left (d x + c\right )^{2} + A a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 30 \, {\left (A a^{3} \cos \left (d x + c\right )^{3} + A a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 174, normalized size = 1.66 \begin {gather*} \frac {3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 25 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 90 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {274 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 90 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 25 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, A a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.16, size = 244, normalized size = 2.32 \begin {gather*} -\frac {A\,a^3\,\left (3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-15\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-25\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+90\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-90\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+25\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+120\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}{480\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________